package tech.yunland.shop.domain.model;

import com.moyuer.bsf.domain.model.AbstractEntity;
import com.moyuer.bsf.domain.model.User;

import javax.persistence.*;
import java.math.BigInteger;
import java.util.Date;

/**
 * 用户活跃度
 *
 * @author 文卡<wkwenka@gmail.com>  on 17-5-24.
 */
@Entity
@Table(name = "user_activity")
public class UserActivity extends AbstractEntity{

    @OneToOne
    @JoinColumn(name = "user_id")
    private User user;

    @Column(name = "active_score")
    private BigInteger activeScore = BigInteger.ZERO;

    @Column(name = "update_time")
    private Date updateTime;

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public BigInteger getActiveScore() {
        return activeScore;
    }

    public void setActiveScore(BigInteger activeScore) {
        this.activeScore = activeScore;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
